package textdiff {
	
	/**
	 * One line in one file. For UniqueMatch lines, holds a line number 
	 * pointer into the other file.
	 */
	public class LineInfo {
	    public static const EOF:int = -1;
	    public static const OLDONLY:int = 1;
	    public static const NEWONLY:int = 2;
	    public static const UNIQUEMATCH:int = 3;
	    public static const OTHER:int = 4;
	
	    public var lineStatus:int = 0;
	    public var oldLineNum:int = 0;
	    public var newLineNum:int = 0;
	    public var blockNum:int = 0;
	
	    public function LineInfo(aLineStatus:int=0, aOldLineNum:int=0, aNewLineNum:int=0, aBlockNum:int=0) {
	        lineStatus = aLineStatus;
	        oldLineNum = aOldLineNum;
	        newLineNum = aNewLineNum;
	        blockNum = aBlockNum;
	    }
	
	    public function isEOF():Boolean {
	        return (lineStatus == EOF);
	    }
	
	    public function isMatch():Boolean {
	        return (lineStatus == UNIQUEMATCH);
	    }
	
	    public function isOldOnly():Boolean {
	        return (lineStatus == OLDONLY || lineStatus == OTHER);
	    }
	
	    public function isNewOnly():Boolean {
	        return (lineStatus == NEWONLY || lineStatus == OTHER);
	    }
	
	    public function setBlockNumber(aBlockNum: int):void {
	        blockNum = aBlockNum;
	        lineStatus = UNIQUEMATCH;
	    }
	
	    public function toString():String {
	        return "Status=" + lineStatus + " OldNum=" + oldLineNum + " NewNum=" + newLineNum + " Block=" + blockNum;
	    }
	}
}